package com.thb.pay.agent.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.thb.pay.db.entity.SuperEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 代理商-账户-流水表
 * </p>
 *
 * @author lucky
 * @since 2019-07-21
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
@Accessors(chain = true)
@TableName("agent_account_history")
public class AgentAccountHistory extends SuperEntity<AgentAccountHistory> {

    public static final Integer INCREASE_MONEY = 1; //加款
    public static final Integer DECREASE_MONEY = 2;//减款

    //业务类型,1-分润,2-提现,3-调账
    public static final Integer AGENT_BIZ_TYPE_PROFIT = 1;//代理商-分润
    public final static Integer AGENT_BIZ_TYPE_REMIT = 2; // 代理商-打款
    public final static Integer AGENT_BIZ_TYPE_CHANGE_BALANCE = 3; // 代理商-调账
    private static final long serialVersionUID = 1L;
    /**
     * 代理商ID
     */
    private Long agentId;

    /**
     * 变动金额
     */
    private Long amount;

    /**
     * 账户余额
     */
    private Long balance;

    /**
     * 变更后账户余额
     */
    private Long afterBalance;

    /**
     * 资金变动方向,1-加款,2-减款
     */
    private Integer fundDirection;

    /**
     * 业务类型,1-分润,2-提现,3-调账
     */
    private Integer bizType;

    /**
     * 业务类目:10-余额,11-代付余额,12-冻结金额,13-保证金,20-支付,21-代付,22-线下充值,23-线上充值
     */
    private String bizItem;

    /**
     * 平台订单号
     */
    private String orderId;

}
